package com.yvon.maple.service.msg.core.mapper;

import com.yvon.boot.mybatis.BaseMapper;
import com.yvon.maple.service.msg.core.model.entity.ImContent;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.util.List;

/**
 * @author : Yvon
 * @since : 2021-08-26
 */
@Mapper
public interface ImContentMapper extends BaseMapper<ImContent> {


    /**
     * 查询用户未读消息.
     *
     * @param username 用户名
     * @return {@link List<  ImContent  > }
     * @author : Yvon / 2021-09-02
     */
    List<ImContent> selectUnRead(@Param("username") String username);
    /**
     * 获取用户未读消息数量.
     *
     * @param username the username
     * @return long
     * @author : Yvon / 2021-09-02
     */
    long getUnReadCount(@Param("username") String username);
}
